cmake_minimum_required(VERSION 3.20.0)

project(iNav_test LANGUAGES C CXX)

# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")

set(CMAKE_C_COMPILER gcc)
set(CMAKE_C_STANDARD 11) 
set(CMAKE_C_EXTENSIONS OFF)


set(CMAKE_CXX_COMPILER g++)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)

file(GLOB SOURCES "*.cpp" "*.c")

# 头文件目录
include_directories(.)
include_directories(./Eigen)
include_directories(./matlab)

# 源文件目录
aux_source_directory(. SRC0_CUR)
aux_source_directory(./matlab SRC0_CUR1)
list(FILTER SRC0_CUR1 INCLUDE REGEX ".*\\.(cpp|c|h)$")
set(SRC_CUR ${SRC0_CUR} ${SRC0_CUR1})

# set(SRC_CUR ${SRC0_CUR} ${CUR2})
message(${SRC_CUR})

# 生成可执行文件
add_executable(iNav_test ${SRC_CUR})
